package com.baizhi.service.impl;

import com.baizhi.dao.RecordMapper;
import com.baizhi.entity.Record;
import com.baizhi.service.IRecordService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zhenggang
 * @since 2021-09-29
 */
@Service
public class RecordServiceImpl extends ServiceImpl<RecordMapper, Record> implements IRecordService {

    @Override
    public PageInfo<Record> selectByPage(int pageNo, int pageSize, String name, String stuName) {
        PageHelper.startPage(pageNo,pageSize);
        List<Record> records = baseMapper.selectRecordAndStudent(name, stuName);
        return new PageInfo<>(records);
    }
}
